package com.edevp.modules.user.feign;

import com.edevp.common.core.dto.R;
import com.edevp.modules.user.dto.UserInfoDTO;
import com.edevp.modules.user.factory.UserFeignClientFactory;
import com.edevp.modules.user.fallback.UserFeignFallback;
import com.edevp.modules.user.interceptor.FeignRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author edevp
 */
@FeignClient(contextId = "edevp-user-feign", value = "edevp-user",fallbackFactory = UserFeignClientFactory.class)
public interface UserFeignClient {
    /**
     * 通过用户id查询用户信息
     * @param id 用户id
     * @return R<UserInfoDTO> 用户信息
     */
    @GetMapping("/users/info/{id}")
    R<UserInfoDTO> getUserInfo(@PathVariable("id") String id);
}
